package com.ruibang.glass.material.controller.rqgl;


import com.ruibang.glass.material.domain.req.rq.ATypeWaterReq;
import com.ruibang.glass.material.entity.rq.MaterialATypeWaterBottleRackManagement;
import com.ruibang.glass.material.service.rq.MaterialATypeWaterBottleRackManagementService;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 * A型水平托盘管理 前端控制器
 * </p>
 *
 * @author mameng
 * @since 2024-02-05
 */
@Api(tags = "A型水平托盘管理")
@RestController
@RequestMapping("/api/glass/material/a/type/water/bottle/management/")
public class MaterialATypeWaterBottleRackManagementController {


    @Autowired
    private MaterialATypeWaterBottleRackManagementService materialATypeWaterBottleRackManagementService;

    @PostMapping("/list")
    @ApiOperation(value = "获取列表信息", response = ResultBody.class)
    public ResultBody getPageList(@RequestBody ATypeWaterReq aTypeWaterReq) {
        return ResultBody.success(materialATypeWaterBottleRackManagementService.getPage(aTypeWaterReq));
    }

    @PostMapping("/add")
    @ApiOperation(value = "新增", response = ResultBody.class)
    public ResultBody add(@RequestBody MaterialATypeWaterBottleRackManagement materialManagement) {
        materialATypeWaterBottleRackManagementService.save(materialManagement);
        return ResultBody.success();
    }

    @PostMapping("/update")
    @ApiOperation(value = "修改", response = ResultBody.class)
    public ResultBody update(@RequestBody MaterialATypeWaterBottleRackManagement materialManagement) {
        materialATypeWaterBottleRackManagementService.updateById(materialManagement);
        return ResultBody.success();
    }




}
